#pragma once

#include "Ivideo.h"
#include <atlcomcli.h>
#include <DShow.h>


namespace DSP
{
	class videoWindow :
		public Ivideo
	{
	private:
		ATL::CComPtr<IBasicVideo> pVideo;
		ATL::CComPtr<IVideoWindow> pWindow;
		double aspectRatio;
		void calcAspectRatio();
		void getVideoSize(long* pWidth, long* pHeight);
	public:
		videoWindow(void){}
		videoWindow(ATL::CComPtr<IBasicVideo>& pVideo, ATL::CComPtr<IVideoWindow>& pWindow);
		~videoWindow(void);
		void setVideoWindow(HWND hwnd);
		void getWindowPosition(long* left, long* top, long* width, long* height);
		void setWindowPosition(long left, long top, long width, long height);
		double getAspectRatio() const;
	};
}